<?php

namespace Worker\CrawlerBundle\Command;

use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

/**
 * This class starts the Job Server
 *
 * @author opascual
 */
class StartCommand extends ContainerAwareCommand 
{
    
    public function configure()
    {
        $this->setName("worker:crawler:start");
    }
    
    public function execute()
    {
        $output->writeln("Starting Gearman Job Server...");
        $this->getContainer()->get('crawler')->start();
        $output->writeln("Done!!.");
    }
}

?>
